<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定位-3</title>
    <style>


        .container {
            width: 400px;
            height: 400px;
            background-color: lime;
            margin-left: 300px;
            position: relative;
            padding: 30px;
        }

        .box {
            width: 300px;
            height: 300px;
            background-color: red;

        }

        .item {
            width: 200px;
            height: 200px;
            background-color: black;
            position: absolute;
            left: 100px;
        }

    </style>
</head>
<body>


<div class="container">

    <div class="box">

        <div class="item">


        </div>

    </div>

</div>
</body>
</html>